package com.example.a14113.intent;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android. content. Intent;
import android. net .Uri;
import android .view .View;
import android. widget.Button;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Button dialer = (Button) findViewById(R.id.Button02);
        dialer.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel://114"));
                startActivity(intent);
            }
        });
    }
}
